package main

import "fmt"

type Dog struct {
	Name  string
	Color string
}

func main() {
	Spot := Dog{Name: "Spot", Color: "brown"}
	fmt.Println(Spot)

	var Rover Dog
	Rover.Name = "Rover"
	Rover.Color = "light tan with dark patches"
	fmt.Println(Rover)
	// 创建指针类型的结构体
	dogPoint := new(Dog)
	dogPoint.Name = "德牧"
	dogPoint.Color = "黑色"
	fmt.Println(dogPoint)
	// >> &{德牧 黑色}
}
